export const getBtnList = (type: string, chileType: string, selection: any) => {
  const btnlist = <any>{
    '1': [
      {
        name: '选商原则',
        type: 'Select',
        func: () => {
          return Promise.resolve();
        },
      },
      {
        name: '自动预选',
        type: 'button',
        typeChange: 'autoBudget',
        permission: ['procurement:compare:operation'],
        func: () => Automaticbudget(type, chileType, selection),
      },
      {
        name: '生成比价单',
        typeChange: 'generateSheet',
        type: 'button',
        permission: ['procurement:compare:generate'],
        func: () => Generateapricecomparisonsheet(type, chileType, selection),
      },
      {
        name: '退回',
        typeChange: 'back',
        type: 'button',
        permission: ['procurement:compare:return'],
        func: () => sendback(type, chileType, selection),
      },
      {
        name: '批量上传供应商选择文件',
        type: 'button',
        permission: ['procurement:plan-file:supBatchSave:compare'],
        typeChange: 'uploadBatch',
        func: () => {
          return Promise.resolve();
        },
        // func: () => Bulkuploadvendorselectionfiles(type, chileType, selection),
      },
      // {
      //   name: '撤销询比价',
      //   type: 'button',
      //   func: () => Withdrawtheinquiry(type, chileType, selection),
      // },
      {
        name: '提交审批',
        typeChange: 'approval',
        permission: ['procurement:compare:approved'],
        type: 'button',
        func: () => submitforapproval(type, chileType, selection),
      },
    ],
  };
  return btnlist[`${type}`];
};

// 自动预选
const Automaticbudget = (type: string, chileType: string, selection: any) => {
  console.log('自动预选', type, chileType, selection);
};

// 生成比价单
const Generateapricecomparisonsheet = (
  type: string,
  chileType: string,
  selection: any
) => {
  console.log('生成比价单', type, chileType, selection);
};

// 退回
const sendback = (type: string, chileType: string, selection: any) => {
  console.log('退回', type, chileType, selection);
};
// 批量上传供应商选择文件
// const Bulkuploadvendorselectionfiles = (
//   type: string,
//   chileType: string,
//   selection: any
// ) => {
//   console.log('批量上传供应商选择文件', type, chileType, selection);
// };
// 撤销询比价
// const Withdrawtheinquiry = (
//   type: string,
//   chileType: string,
//   selection: any
// ) => {
//   console.log('撤销询比价', type, chileType, selection);
// };
// 提交审批
const submitforapproval = (type: string, chileType: string, selection: any) => {
  console.log('提交审批', type, chileType, selection);
};

export default null;
